<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="root"></div>
    <script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js" ></script>
    <!-- <script>
        
        const TitleElement = React.createElement("h1",{title:"hhh"},"hello")
        const ContentElement = React.createElement("p",null,"内容");
        const DivElement = React.createElement("div",null,TitleElement,ContentElement);

        const root = ReactDOM.createRoot(document.getElementById('root'));  
        root.render(DivElement);
    </script> -->
    <script  type="text/babel">
        const TitleElement = function(){
            return (
                <h1 title="hhh">标题</h1>
            )
        }
        const ContentElement = function(){
            return (
                <p >内容</p>
            )
        }
        const DivElement = function(){
            return (
                <div>
                    <TitleElement></TitleElement>
                    <ContentElement></ContentElement>
                </div>
            )
        }
        const root = ReactDOM.createRoot(document.getElementById('root')); 
        root.render(<DivElement />); 
    </script>
</body>
</html>